import mockjs from 'mockjs';

const genRsp = (respData: object) =>
    mockjs.mock({
        success: true,
        code: 200,
        ...respData
    });

export default [
    {
        url: '/api/premission/module',
        method: 'get',
        response: genRsp({
            data: [
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 1,
                    moduleName: '部门管理',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 0
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 3,
                    moduleName: '字典管理',
                    moduleType: 0,
                    parentId: 4,
                    showOrder: 1
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 2,
                    moduleName: '用户权限',
                    moduleType: 0,
                    showOrder: 1
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 4,
                    moduleName: '系统配置',
                    moduleType: 0,
                    showOrder: 2
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 5,
                    moduleName: '角色管理',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 3
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 6,
                    moduleName: '角色用户授权',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 4
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 7,
                    moduleName: '数据权限管理',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 5
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 8,
                    moduleName: '用户管理',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 5
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 9,
                    moduleName: '数据权限用户授权',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 6
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 10,
                    moduleName: '权限模块管理',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 7
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 11,
                    moduleName: '权限资源管理',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 8
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 12,
                    moduleName: '菜单管理',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 9
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 13,
                    moduleName: '权限字管理',
                    moduleType: 1,
                    parentId: 2,
                    showOrder: 10
                }
            ]
        })
    },
    {
        url: '/api/premission/list',
        method: 'get',
        response: genRsp({
            data: [
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 1,
                    moduleIdDictMap: {
                        name: '部门管理',
                        id: 1
                    },
                    permId: 1,
                    permName: '显示列表',
                    showOrder: 1,
                    url: '/admin/upms/sysDept/list'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 1,
                    moduleIdDictMap: {
                        name: '部门管理',
                        id: 1
                    },
                    permId: 2,
                    permName: '导出',
                    showOrder: 2,
                    url: '/admin/upms/sysDept/export'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 1,
                    moduleIdDictMap: {
                        name: '部门管理',
                        id: 1
                    },
                    permId: 3,
                    permName: '详情',
                    showOrder: 3,
                    url: '/admin/upms/sysDept/view'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 1,
                    moduleIdDictMap: {
                        name: '部门管理',
                        id: 1
                    },
                    permId: 4,
                    permName: '新增',
                    showOrder: 4,
                    url: '/admin/upms/sysDept/add'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 1,
                    moduleIdDictMap: {
                        name: '部门管理',
                        id: 1
                    },
                    permId: 5,
                    permName: '编辑',
                    showOrder: 5,
                    url: '/admin/upms/sysDept/update'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 1,
                    moduleIdDictMap: {
                        name: '部门管理',
                        id: 1
                    },
                    permId: 6,
                    permName: '删除',
                    showOrder: 6,
                    url: '/admin/upms/sysDept/delete'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 1,
                    moduleIdDictMap: {
                        name: '部门管理',
                        id: 1
                    },
                    permId: 7,
                    permName: '打印',
                    showOrder: 7,
                    url: '/admin/upms/sysDept/print'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 5,
                    moduleIdDictMap: {
                        name: '角色管理',
                        id: 5
                    },
                    permId: 8,
                    permName: '新增',
                    showOrder: 1,
                    url: '/admin/upms/sysRole/add'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 5,
                    moduleIdDictMap: {
                        name: '角色管理',
                        id: 5
                    },
                    permId: 9,
                    permName: '编辑',
                    showOrder: 2,
                    url: '/admin/upms/sysRole/update'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 5,
                    moduleIdDictMap: {
                        name: '角色管理',
                        id: 5
                    },
                    permId: 10,
                    permName: '删除',
                    showOrder: 3,
                    url: '/admin/upms/sysRole/delete'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 5,
                    moduleIdDictMap: {
                        name: '角色管理',
                        id: 5
                    },
                    permId: 11,
                    permName: '显示列表',
                    showOrder: 4,
                    url: '/admin/upms/sysRole/list'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 5,
                    moduleIdDictMap: {
                        name: '角色管理',
                        id: 5
                    },
                    permId: 12,
                    permName: '详情',
                    showOrder: 5,
                    url: '/admin/upms/sysRole/view'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 6,
                    moduleIdDictMap: {
                        name: '角色用户授权',
                        id: 6
                    },
                    permId: 13,
                    permName: '授权用户',
                    showOrder: 1,
                    url: '/admin/upms/sysRole/addUserRole'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 6,
                    moduleIdDictMap: {
                        name: '角色用户授权',
                        id: 6
                    },
                    permId: 14,
                    permName: '移除用户',
                    showOrder: 2,
                    url: '/admin/upms/sysRole/deleteUserRole'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 6,
                    moduleIdDictMap: {
                        name: '角色用户授权',
                        id: 6
                    },
                    permId: 15,
                    permName: '角色用户列表',
                    showOrder: 3,
                    url: '/admin/upms/sysRole/listUserRole'
                },
                {
                    createTime: '2020-10-17 00:00:00',
                    moduleId: 6,
                    moduleIdDictMap: {
                        name: '角色用户授权',
                        id: 6
                    },
                    permId: 16,
                    permName: '角色未添加用户列表',
                    showOrder: 4,
                    url: '/admin/upms/sysRole/listNotInUserRole'
                }
            ]
        })
    }
];
